gtkspinbutton: Drop grab_notify handler
authorCarlos Garnacho <carlosg@gnome.org>
Wed, 24 Jun 2020 12:12:01 +0000 (14:12 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Wed, 24 Jun 2020 18:35:22 +0000 (20:35 +0200)
The press gesture on the buttons already has a ::cancel handler,
this is redundant.

gtk/gtkspinbutton.c

index e41d25d990b80183a4debd8cf7dd1d838369432e..3da876839c6cd7eadd1676b50cdf723dfc1b12fe 100644 (file)
@@ -273,8 +273,6 @@ static void gtk_spin_button_get_property   (GObject         *object,
                                             GValue          *value,
                                             GParamSpec      *pspec);
 static void gtk_spin_button_realize        (GtkWidget          *widget);
-static void gtk_spin_button_grab_notify    (GtkWidget          *widget,
-                                            gboolean            was_grabbed);
 static void gtk_spin_button_state_flags_changed  (GtkWidget     *widget,
                                                   GtkStateFlags  previous_state);
 static gboolean gtk_spin_button_timer          (GtkSpinButton      *spin_button);
@@ -350,7 +348,6 @@ gtk_spin_button_class_init (GtkSpinButtonClass *class)
   gobject_class->get_property = gtk_spin_button_get_property;
 
   widget_class->realize = gtk_spin_button_realize;
-  widget_class->grab_notify = gtk_spin_button_grab_notify;
   widget_class->state_flags_changed = gtk_spin_button_state_flags_changed;
   widget_class->mnemonic_activate = gtk_spin_button_mnemonic_activate;
   widget_class->grab_focus = gtk_spin_button_grab_focus;
@@ -1190,18 +1187,6 @@ gtk_spin_button_update_width_chars (GtkSpinButton *spin_button)
   gtk_editable_set_width_chars (GTK_EDITABLE (spin_button->entry), width_chars);
 }
 
-static void
-gtk_spin_button_grab_notify (GtkWidget *widget,
-                             gboolean   was_grabbed)
-{
-  GtkSpinButton *spin = GTK_SPIN_BUTTON (widget);
-
-  GTK_WIDGET_CLASS (gtk_spin_button_parent_class)->grab_notify (widget, was_grabbed);
-
-  if (!was_grabbed)
-    gtk_spin_button_stop_spinning (spin);
-}
-
 static void
 gtk_spin_button_state_flags_changed (GtkWidget     *widget,
                                      GtkStateFlags  previous_state)